# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=virustotal
pkgver=4.9aea023
pkgrel=5
groups=('blackarch' 'blackarch-malware')
pkgdesc='Command-line utility to automatically lookup on VirusTotal all files recursively contained in a directory.'
arch=('any')
url='https://github.com/botherder/virustotal'
license=('custom:unknown')
depends=('python2' 'python2-simplejson')
makedepends=('git')
source=("git+https://github.com/botherder/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

prepare() {
  cd $pkgname

  sed -i 's|/usr/bin/env python|/usr/bin/env python2|' vt.py
}

package() {
  cd $pkgname

  install -Dm 755 vt.py "$pkgdir/usr/bin/$pkgname"
  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
}

